let Koa, config, middleware;
Koa = require('koa');
config = require('./config');
middleware = require('./middleware');

let app = module.exports = new Koa();

// middlewares are imported here.
middleware(app, config);

app.listen(config.server.port);
console.log(`app[${app.env}] listen ${config.server.port} ...`);
